import { resolve } from 'path'

export default {
  loading: {
    color: 'DodgerBlue'
  },
  alias: {
    'images': resolve(__dirname, './assets/images')
  },

  head: {
    title: '国艺文津',
    htmlAttrs: {
      lang: 'zh'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { name: 'name', content: '国艺文津 - 弘扬传统文化，打造优质内容服务提供商' },
      { name: 'keywords', content: '国艺,国艺文创,国艺文津,文创,IPTV,OTT,有线电视,创意文化,熊猫部落,多屏互动,在线观看。' },
      { hid: 'description', name: 'description', content: '"国艺文津致力于弘扬传统文化，打造优质内容服务提供商，以“内容+渠道+平台+用户”生态位中心，为用户提供精彩的文化传媒服务及体验。' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  server: {
    // host: '0.0.0.0',
    port: 8080
  },

  router: {
    extendRoutes (routes, resolve) {
      routes.push({
        name: 'custom',
        path: '*',
        component: resolve(__dirname, 'pages/404.vue')
      })
    }
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'animate.css/animate.min.css',
    '@/assets/scss/main.scss'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    // {src: '~/plugins/nav.js', mode: 'server'},
    {src: '~/plugins/axios.js'}
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: [
    '~/components',
    '~/layouts'
  ],  

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/bootstrap
    'bootstrap-vue/nuxt',
    '@nuxtjs/axios'
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    babel: {
      "compact": false
    }
  },
  env: {
    // baseUrl: 'http://backend.cloudgather.com.cn'
    // baseUrl: 'http://localhost:3000'
    baseUrl: 'http://admin.portal.cnart.net.cn'
  },
}
